home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / ATTRS.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  47 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   ATTRS   .DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NBT1.INC"
  19. COLOR 7, 0
  20. CLS
  21. ? "┌────────────────────────────────────────────────────────────────────────
  22. ? "│ fColor2Attr? ( Fgrnd?, Bgrnd? )
  23. ? "│ fInvAttr?    ( Attr? )
  24. ? "│  Attr2Color  ( Attr?, Fgrnd?, Bgrnd? )
  25. ? "│ fSwapAttr?   ( Attr? )
  26. ? "├─────────────────────────────────────────────────────────────────────────────
  27. ? "│ The DASoft text printing routines all work with a single color attribute
  28. ? "│ byte. fColor2Attr? and Attr2Color are simple interfaces from/to PowerBASIC's
  29. ? "│ COLOR statement and the attributes. They really have no place in a program
  30. ? "│ as they would take unnecessary space but are provided here for training.
  31. ? "│ fInvAttr?  swaps the foreground, background and sets blink correctly
  32. ? "│ fSwapAttr? swaps the foreground and background colors
  33. ? "│ The big difference in these two is that fInvAttr should be used when
  34. ? "│ you've got BlinkOff and fSwapAttr? when you've got BlinkOn
  35. ? "└─────────────────────────────────────────────────────────────────────────────
  36.  
  37. PRINT "fColor2Attr?( 0, 7 ) = "; fColor2Attr?( 0, 7 )
  38.  
  39. Attr2Color 112, Fgrnd?, Bgrnd?
  40. PRINT " Attr2Color 112, Fgrnd?, Bgrnd? ";
  41. PRINT USING "loads: Fgrnd? =## Bgrnd? =##"; Fgrnd?, Bgrnd?
  42.  
  43. ' ──────────────────────────────────────────────────────────────────────────
  44.  
  45. PRINT "fInvAttr? ( 254 ) ="; fInvAttr? ( 254 )
  46. PRINT "fSwapAttr?( 112 ) ="; fSwapAttr?( 112 )
  47.